setOpacity

abstract fun setOpacity(block: DesignBlock, @FloatRange(from = 0.0, to = 1.0) value: Float)

Set the opacity of the given design block. Required scope: "layer/opacity"

Parameters

block

the block whose opacity should be set.

value

the opacity to be set. The valid range is 0 to 1.